package com.project.class4_8.dynamicproxy;

public class Test {
    public static void main(String[] args) {
        //产生代理工厂并传入代理目标对象
        ProxyFactory factory= new ProxyFactory(new WenBoss());
        /**
         * 从代理工厂中得到代理对象为接口的实现类
         */
        IEat ie= (IEat) factory.getProxy();
        ie.eat();
        ie.drunk();
    }
}
